1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method, and more particularly, to a resolution transforming process for image data.
2. Description of Related Art
As a display device for a computer apparatus such as a personal computer and a workstation, or a display device for television broadcast conforming to the NTSC system or PAL system, the so-called CRT display device of the raster scan type is widely used at present. However, in view of space saving, energy conservation, ergonomics and the like, a flat panel display device such as a liquid crystal panel(LCD) and a plasma display panel(PDP) is recently noticed widely.
A video signal, which is composed of analog image data and vertical and horizontal sync signals or a composite signals of them, is used for connecting a host computer apparatus to the CRT display device. The video signal has an extremely large number of specifications and, in particular, a video signal for use in some personal computers has a plurality of resolutions. For instance, among IBM PC/AT-compatible computers, etc., there is equipment capable of displaying an image on the basis of resolutions such as xe2x80x9c320xc3x97200xe2x80x9d, xe2x80x9c640xc3x97400xe2x80x9d, xe2x80x9c720xc3x97400xe2x80x9d, xe2x80x9c640xc3x97350xe2x80x9d, xe2x80x9c640xc3x97480xe2x80x9d, xe2x80x9c800xc3x97600xe2x80x9d, xe2x80x9c1024xc3x97768xe2x80x9d and xe2x80x9c1280xc3x971024xe2x80x9d.
On the contrary, among the CRT display devices, there is what is called a multi-sync CRT display device, which is arranged to cope with a plurality of resolutions by measuring a sync signal of the video signal and matching the driving period and the amplitude of a scanning line with those of the sync signal of the video signal. In this occasion, video signals or sync signals for some host computers have been measured in advance, and the measured results are stored in a memory in the CRT display device as display parameters. In the case where the host computer can be specified upon measuring the sync signal, the display parameters in the memory are used, so as to provide a display including the display position of the image with higher precision.
A current dot-matrix display device such as a liquid display panel or plasma display panel is suitable to a display control operation by a digital signal. Therefore, there are many cases of adopting a method whereby an inputted analog image signal is A/D-converted once and, thereafter, is displayed. In this occasion, it can be said xe2x80x9caccording to the performance of the current dot-matrix display device, that is, one pixel thereof is larger as compared with a shadow mask of the CRT display device, so that it is difficult to control sampling in the horizontal directionxe2x80x9d. Therefore, generally, one pixel of the video signal is sampled correspondingly to one pixel of the display panel to be displayed.
Accordingly, there is needed a resolution transforming process for video signal by an interpolating or decimating process in the case of displaying a video signal having a low resolution on a dot-matrix display device having a high resolution, or displaying a video signal having a high resolution on a dot-matrix display device having a low resolution.
On the other hand, in the U.S.A., a digital television broadcast using a ground wave started in the autumn of 1998. ATSC (Advanced Television Systems Committee) has specified 18 kinds of image formats as an image format of the digital television broadcast. According to the specified image formats, there are the image formats whose number of scanning lines and number of pixels in the horizontal direction are xe2x80x9c1080xc3x971920xe2x80x9d, xe2x80x9c720xc3x971280xe2x80x9d, xe2x80x9c480xc3x97704xe2x80x9d, and xe2x80x9c480xc3x97640xe2x80x9d. As for the scanning system, there are the image formats of xe2x80x9c60Ixe2x80x9d(numeral indicates a rewriting frequency and xe2x80x9cIxe2x80x9d indicates interlaced scanning), xe2x80x9c30Pxe2x80x9d(xe2x80x9cPxe2x80x9d indicates sequential scanning), xe2x80x9c24Pxe2x80x9d, and xe2x80x9c60Pxe2x80x9d. By combination of the resolution and the scanning system, 18 kinds of image formats are specified.
However, ABC, NBC, and CBS broadcasts as three big television networks in the U.S.A. have determined adoption of different image formats of xe2x80x9c720Pxe2x80x9d, xe2x80x9c1080Pxe2x80x9d, and xe2x80x9c1080Ixe2x80x9d, respectively, in an HDTV (High definition television) broadcast whose aspect ratio is 16:9. Consequently, in order to display each of the digital television broadcasts having a plurality of image formats as mentioned above on the whole effective display picture plane of the dot-matrix display device based on a fixed resolution, the resolution transforming process for video signal by the interpolating or decimating process is needed.
As for the resolution transforming method, generally, there are exemplified methods such as a nearest neighbor interpolation method, a linear interpolation method, and a cubic convoluting interpolation method, using an FIR filter. According to the nearest neighbor interpolation method, input data located at the position nearest to an interpolated position is set to interpolation data. According to the linear interpolation method, a value which is obtained by linear calculation utilizing a distance as a parameter from input data located on both sides of an interpolated position (at the time of interpolation in the horizontal direction) is set to interpolation data. According to the cubic convoluting interpolation method, the sum of products of input data serving as total four pixels of each of two pixels on both sides of an interpolated position (at the time of interpolation in the horizontal direction) and a value of a cubic function utilizing a distance from the interpolated position to each input data as parameters is set to interpolation data.
However, in a case where the nearest neighbor interpolation method is used for a line drawing image such as text, the line width of the text is not made constant, so that the image quality after resolution transformation is degraded. In a case where the linear interpolation method or the cubic convoluting interpolation method is used for the line drawing image such as text, a high-frequency component in the line drawing portion such as text is lost, so that blur is caused in the image quality after resolution transformation.
To solve such problems, for example, there has been proposed a method as disclosed in Japanese Laid-Open Patent Application No. Hei 6-152938, in which an interpolating coefficient having low-pass characteristics and an interpolating coefficient having high-pass characteristics are switched over according to a difference value of video signals at two pixels to be subjected to interpolation.
According to the above-mentioned proposed method, an edge portion of an image is interpolated by using a high-pass filter. However, contrast is decreased as compared with the original data or with contrast by the nearest neighbor interpolation method. Further, the resolution transformation based on the proposed method is executed to enlargement only.
It is an object of the invention to solve the above-stated problems.
It is another object of the invention to execute a resolution transforming process capable of obtaining an image with high definition.
It is a further object of the invention to execute a resolution transforming process at an arbitrary magnification irrespective of enlargement and reduction while reducing blur and ununiformity of the line width such as text.
To solve the above-stated problems and attain the above-stated objects, in accordance with an aspect of the invention, there is provided an image processing apparatus for transforming resolution of input image data and outputting the resolution-transformed image data, the image processing apparatus comprising deciding means for deciding, on the basis of information of input resolution of input image data and information of output resolution to be obtained after transformation of resolution, which of a first resolution transforming process and a second resolution transforming process is to be used for each pixel of output image data, and resolution transforming means for performing a resolution transforming process on the input image data on the basis of a result of decision made by the deciding means, wherein the resolution transforming means performs the first resolution transforming process and the second resolution transforming process on the basis of the result of decision made by the deciding means when the output resolution is larger than the input resolution, and the resolution transforming means performs the second resolution transforming process irrespective of the result of decision made by the deciding means when the input resolution is larger than the output resolution.